package com.google.precinct.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;

public class SearchHeaderBar extends Composite {

	private static SearchHeaderBarUiBinder uiBinder = GWT
			.create(SearchHeaderBarUiBinder.class);

	interface SearchHeaderBarUiBinder extends UiBinder<Widget, SearchHeaderBar> {
	}

	@UiField
	Button search;

	@UiField
	TextBox query;

	public SearchHeaderBar() {
		initWidget(uiBinder.createAndBindUi(this));
		search.setText("Go There");
	}

//	@UiHandler("search")
//	void onClick(ClickEvent e) {
//		String val = query.getValue().trim();
//		if (val.length() == 0) {
//			query.setFocus(true);
//			return;
//		}
//		Window.alert("Hello!");
//	}

}
